package com.meiyue.bean.entity;

import javax.persistence.*;

/**
 * MeiyueJavaProject
 * com.meiyue.bean.entity
 * Created by Chris Chen
 * 2017/9/14
 * Explain:
 */
@Entity
@Table(name = "test_representative_service_places", schema = "test_yuedao", catalog = "")
public class TestRepresentativeServicePlacesEntity {
    private int servicePlaceId;
    private int representativeId;

    @Basic
    @Column(name = "service_place_id", nullable = false)
    public int getServicePlaceId() {
        return servicePlaceId;
    }

    public void setServicePlaceId(int servicePlaceId) {
        this.servicePlaceId = servicePlaceId;
    }

    @Basic
    @Column(name = "representative_id", nullable = false)
    public int getRepresentativeId() {
        return representativeId;
    }

    public void setRepresentativeId(int representativeId) {
        this.representativeId = representativeId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TestRepresentativeServicePlacesEntity that = (TestRepresentativeServicePlacesEntity) o;

        if (servicePlaceId != that.servicePlaceId) return false;
        if (representativeId != that.representativeId) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = servicePlaceId;
        result = 31 * result + representativeId;
        return result;
    }

    private int id;

    @Id
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
}
